<template>
  <div>
    <p>{{ count }}</p>
    <button @click="addCount">+1</button>
  </div>
</template>
<script>
import { ref } from 'vue'

export default {
  setup() {
    const count = ref(1)
    const addCount = () => {
      // 要加 .value
      count.value++
    }
    return {
      count,
      addCount,
    }
  },
}
</script>
